package com.ryan.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ryan.order.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author ryan
 * @since 2020-07-31
 */
public interface OrderService extends IService<Order> {

    Page<Order> getOrderList(long pageIndex, long pageSize, String orderNo);

    /**
     * 根据路线id和会员id判断是否已经购买此路线
     * @param routeId
     * @param memberId
     * @return
     */
    Boolean isBuyRoute(String routeId, String memberId);

    Order createOrder(String routeId, String memberId);

    /**
     * 通过订单号获取订单信息
     * @param orderNo
     * @return
     */
    Order getOrderByNo(String orderNo);
}
